<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>搜索</title>
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
 <meta name="apple-mobile-web-app-capable" content="no" />
<link href="__PUBLIC__/css/Style.css" rel="stylesheet"/>
<link href="__PUBLIC__/css/JobSearch.css" rel="stylesheet">
        <script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.js"></script>
    </head>
<body>
 
<header>

    <h2>图书搜索</h2>
</header>
 
 
  <div class="asContent">
    <form action="joblist" method="post" id="frmSearch" name="frmSearch" >
    <input type="text" class="asBox" placeholder="" id="txtKeyWord" name="KeyWord" />
  </div>

    <input type="submit" class="saQuery" value="搜索关键词">
    <input type="button" class="saQuery" id="qr" value="二维码扫描">
    </form>
    <div class="asHistory" id="divHistory">
      <span class="ashLeft">
        <span class="searchistory"></span><span class="ashText">最近搜索记录</span>
      </span>
      <span class="ashRight">
        <span class="delhistory"></span><span class="ashText" onclick="javascript:void(0)clearCookie()">清空记录</span>
      </span>
      <div class="ashContent">
        <span class="ashcRow"  style="cursor:pointer" onclick="javascript:void(0)LastSearch(0)"><span class="ashcLeft">数学 </span><span class="ashcRight"></span></span>
      </div>
    </div>
  </div>
    


   
  </div>
</div>

    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script  type="text/javascript">  
wx.config({
debug: false,
appId: '<?php echo $signpackage["appId"];?>',
timestamp: '<?php echo $signpackage["timestamp"];?>',
nonceStr: '<?php echo $signpackage["nonceStr"];?>',
signature: '<?php echo $signpackage["signature"];?>',
jsApiList: [
'scanQRCode',
]
});
    wx.error(function(res) {  
        alert("出错了：" + res.errMsg);
    });  
    wx.ready(function() {  
        wx.checkJsApi({  
            jsApiList : ['scanQRCode'],  
            success : function(res) {  
            }  
        });  
        //扫描二维码
        document.querySelector('#qr').onclick = function() {  
            wx.scanQRCode({  
                needResult : 1,// 默认为0，扫描结果由微信处理，1则直接返回扫描结果，  
                scanType : [ "qrCode", "barCode" ], // 可以指定扫二维码还是一维码，默认二者都有  
                success : function(res) {  
                    var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
                    alert(result); 
                    //$.post('__APP__/Scan/isbmreturn',{'isbm',result});
                    window.location.href= "__APP__/Bookent/book/isbm/" + result;
                }  
            });  
        };//end_document_scanQRCode  
          
    });//end_ready  
</script> 
<script type="text/javascript">
    $('.button1').click(function(){
          $("form").submit();
    });
</script>
    </body>
</html>